package 命令模式;

public class main {
    public static void main(String[] args) {
        //定义命令的发送与接受
        Receiver receiver = new Receiver();
        Command command = new ConcreteCommand(receiver);
        //定义命令的调用者
        Invoker invoker = new Invoker(command);
        //命令调用
        invoker.action("command");
    }
}
